﻿using MediatR;
using RBAC.LuFang.API.Application.Command.imgCommand;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.imgCommandHandler
{
    //删除养殖下的企业照片
    public class imgDelYEnterCommandHandler:IRequestHandler<imgDelYEnterCommand,int>
    {
        private readonly IGoodsService _goodsService;

        public imgDelYEnterCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<int> Handle(imgDelYEnterCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.DelEnterPic(request.id);
        }
    }
}
